﻿CREATE TABLE [dbo].[Comment]
(
    [CommentId] [uniqueidentifier] DEFAULT newid() NOT NULL,
	[Activity] [uniqueidentifier] NOT NULL, -- FK to Activity
	[CreatedBy] [uniqueidentifier] NOT NULL, -- FK to Person
	[Date] [datetime] DEFAULT getdate() NOT NULL,
	[Text] [nvarchar](max) NOT NULL,
	[Priority] [int] NULL,
    [IsDeleted] [bit] DEFAULT 0 NOT NULL,
	[LastChanged] [datetime] DEFAULT getdate() NOT NULL,
	[LastChangedBy] [uniqueidentifier] NOT NULL, -- FK to Person
	[TimeStamp] [timestamp] NOT NULL

CONSTRAINT [PK_Comment] PRIMARY KEY CLUSTERED 
(
    [CommentId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO